package com.telecom.restaurant.dao;

import com.telecom.restaurant.domin.vo.MenuFoodVO;
import com.telecom.restaurant.model.FoodPO;
import com.telecom.restaurant.model.param.FoodSearchParam;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface FoodDao {
    int deleteByPrimaryKey(Long id);

    int insert(FoodPO record);

    FoodPO selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(FoodPO record);

    int updateByPrimaryKey(FoodPO record);

    List<FoodPO> searchFood(FoodSearchParam param);

    List<FoodPO> getByIds(@Param("foodIdList") List<Long> foodIdList);

    int countSearch(FoodSearchParam param);

    List<MenuFoodVO> getFoodByMenuId(@Param("menuDayId") Long menuDayId, @Param("offset") int offset, @Param("limit") int limit);
}